package com.zilu.digitaltwin.common.util;

import java.text.DateFormat;
import java.util.Calendar;

/**
 * @author :caijianbao
 * @date : 2023/1/2 22:47
 */
public class DateUtil {

    public static String getUTCTimeStr(DateFormat df) {
        Calendar cal = Calendar.getInstance();
        int zoneOffset = cal.get(15);
        int dstOffset = cal.get(16);
        cal.add(14, -(zoneOffset + dstOffset));
        return df.format(cal.getTime());
    }
}
